package com.genewu.cloud.jdbc.impl.fake;

import com.genewu.cloud.jdbc.core.DriverCore;

import java.sql.Array;
import java.sql.Blob;
import java.sql.CallableStatement;
import java.sql.Clob;
import java.sql.Connection;
import java.sql.DatabaseMetaData;
import java.sql.DriverPropertyInfo;
import java.sql.PreparedStatement;
import java.sql.SQLException;
import java.sql.SQLWarning;
import java.sql.Savepoint;
import java.sql.Statement;
import java.util.Map;
import java.util.Properties;

public class ServiceDriverImpl extends DriverCore {

    public boolean acceptsURL(String url) throws SQLException {
        return true;
    }

    protected String getDriverName() {
        return "driver";
    }

    public Connection connect(String url, Properties info) throws SQLException {
        Connection conn = new Connection() {

            Properties properties = new Properties();

            public Statement createStatement() throws SQLException {
                return null;  //To change body of implemented methods use File | Settings | File Templates.
            }

            public PreparedStatement prepareStatement(String sql) throws SQLException {
                return null;  //To change body of implemented methods use File | Settings | File Templates.
            }

            public CallableStatement prepareCall(String sql) throws SQLException {
                return null;  //To change body of implemented methods use File | Settings | File Templates.
            }

            public String nativeSQL(String sql) throws SQLException {
                return null;  //To change body of implemented methods use File | Settings | File Templates.
            }

            public void setAutoCommit(boolean autoCommit) throws SQLException {
                //To change body of implemented methods use File | Settings | File Templates.
            }

            public boolean getAutoCommit() throws SQLException {
                return false;  //To change body of implemented methods use File | Settings | File Templates.
            }

            public void commit() throws SQLException {
                //To change body of implemented methods use File | Settings | File Templates.
            }

            public void rollback() throws SQLException {
                //To change body of implemented methods use File | Settings | File Templates.
            }

            public void close() throws SQLException {
                //To change body of implemented methods use File | Settings | File Templates.
            }

            public boolean isClosed() throws SQLException {
                return false;  //To change body of implemented methods use File | Settings | File Templates.
            }

            public DatabaseMetaData getMetaData() throws SQLException {
                return null;  //To change body of implemented methods use File | Settings | File Templates.
            }

            public void setReadOnly(boolean readOnly) throws SQLException {
                //To change body of implemented methods use File | Settings | File Templates.
            }

            public boolean isReadOnly() throws SQLException {
                return false;  //To change body of implemented methods use File | Settings | File Templates.
            }

            public void setCatalog(String catalog) throws SQLException {
                //To change body of implemented methods use File | Settings | File Templates.
            }

            public String getCatalog() throws SQLException {
                return null;  //To change body of implemented methods use File | Settings | File Templates.
            }

            public void setTransactionIsolation(int level) throws SQLException {
                //To change body of implemented methods use File | Settings | File Templates.
            }

            public int getTransactionIsolation() throws SQLException {
                return 0;  //To change body of implemented methods use File | Settings | File Templates.
            }

            public SQLWarning getWarnings() throws SQLException {
                return null;  //To change body of implemented methods use File | Settings | File Templates.
            }

            public void clearWarnings() throws SQLException {
                //To change body of implemented methods use File | Settings | File Templates.
            }

            public Statement createStatement(int resultSetType, int resultSetConcurrency) throws SQLException {
                return null;  //To change body of implemented methods use File | Settings | File Templates.
            }

            public PreparedStatement prepareStatement(String sql, int resultSetType, int resultSetConcurrency) throws SQLException {
                return null;  //To change body of implemented methods use File | Settings | File Templates.
            }

            public CallableStatement prepareCall(String sql, int resultSetType, int resultSetConcurrency) throws SQLException {
                return null;  //To change body of implemented methods use File | Settings | File Templates.
            }

            public Map<String, Class<?>> getTypeMap() throws SQLException {
                return null;  //To change body of implemented methods use File | Settings | File Templates.
            }

            public void setTypeMap(Map<String, Class<?>> map) throws SQLException {
                //To change body of implemented methods use File | Settings | File Templates.
            }

            public void setHoldability(int holdability) throws SQLException {
                //To change body of implemented methods use File | Settings | File Templates.
            }

            public int getHoldability() throws SQLException {
                return 0;  //To change body of implemented methods use File | Settings | File Templates.
            }

            public Savepoint setSavepoint() throws SQLException {
                return null;  //To change body of implemented methods use File | Settings | File Templates.
            }

            public Savepoint setSavepoint(String name) throws SQLException {
                return null;  //To change body of implemented methods use File | Settings | File Templates.
            }

            public void rollback(Savepoint savepoint) throws SQLException {
                //To change body of implemented methods use File | Settings | File Templates.
            }

            public void releaseSavepoint(Savepoint savepoint) throws SQLException {
                //To change body of implemented methods use File | Settings | File Templates.
            }

            public Statement createStatement(int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException {
                return null;  //To change body of implemented methods use File | Settings | File Templates.
            }

            public PreparedStatement prepareStatement(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException {
                return null;  //To change body of implemented methods use File | Settings | File Templates.
            }

            public CallableStatement prepareCall(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException {
                return null;  //To change body of implemented methods use File | Settings | File Templates.
            }

            public PreparedStatement prepareStatement(String sql, int autoGeneratedKeys) throws SQLException {
                return null;  //To change body of implemented methods use File | Settings | File Templates.
            }

            public PreparedStatement prepareStatement(String sql, int[] columnIndexes) throws SQLException {
                return null;  //To change body of implemented methods use File | Settings | File Templates.
            }

            public PreparedStatement prepareStatement(String sql, String[] columnNames) throws SQLException {
                return null;  //To change body of implemented methods use File | Settings | File Templates.
            }
        };

        return conn;
    }

    public DriverPropertyInfo[] getPropertyInfo(String url, Properties info)
            throws SQLException {
        // TODO Auto-generated method stub
        return null;
    }

    public boolean jdbcCompliant() {
        // TODO Auto-generated method stub
        return false;
    }

}
